package com.ssm.maven.service.impl;

import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.ssm.maven.mapper.UserMapper;
import com.ssm.maven.pojo.UserInf;
import com.ssm.maven.service.UserService;
@Service("userService")
public class UserServiceImpl implements UserService {

	
	private UserMapper userMapper;
	
//	@Autowired  两种方式都是注解
	@Resource(name="userMapper")
	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}
 
	@Override
	public ArrayList<UserInf> getAllUsers() {
		 
		return userMapper.getAllUsers();
	}

}
